#include <stdio.h>
#include <stdlib.h>
#include "moudle.h"
int input(){
	int b;//bool
	char cho;//choose
	char newao[7]="";//the ao inputed
	char newname[20];//pat_name
	int newnum;
	p->next=q;
	q=(pointer)malloc(sizeof(datedef));
	printf("=%-41s=\n","Starting...");
	printf("=%-41s=\n","(skip by enter)");
	printf("=%-41s=\n","(one with * can't be skipped)");
	printf("=%-41s=\n>>>","*Administrative office:");//input ao
	oa:b=scanf("%s",newao);
	//printf("==%c%d",newao,newnum);//text
	if((b != 1)||!(newao[0]>='a'&&newao[0]<='z'||newao[0]>='A'&&newao[0]<='Z')||(newao[1]<'0'||newao[1]>'9')||(newao[2]<'0'||newao[2]>'9')||(newao[3]<'0'||newao[3]>'9')||(newao[4]<'0'||newao[4]>'9')||(newao[5]<'0'||newao[5]>'9')){
		fflush(stdin);
		line();
		printf("=%-41s=\n=%-41s=\n=%-41s=\n===========================================\n=Choose>>>","Error:Wrong input!","Q:back to menu","Enter:input again");
		cho=getchar();
		fflush(stdin);
		if(cho=='Q'||cho=='q'){
			showmenu();
		}else{
			printf("=input again>>>");
			goto oa;
		}
	}
	line();
	printf("=%-41s=\n>>>","*Patient name:");//input pat_name
	while(scanf("%s",newname)!=1){
		fflush(stdin);
		line();
		printf("=%-41s=\n=%-41s=\n=%-41s=\n===========================================\n=Choose>>>","Error:Wrong input!","Q:back to menu","Enter:input again");
		cho=getchar();
		fflush(stdin);
		if(cho=='Q'||cho=='q'){
			showmenu();
		}else{
			printf("=input again>>>");
		}
	}
	return 0;
}
int line(){
	printf("===========================================\n");
	return 0;
}
